package com.fund.main.entity;


import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fund.serializer.LongToStringSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

import static com.fund.utils.AppDateUtil.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import static com.fund.utils.AppDateUtil.TIME_ZONE_DEFAULT;

/**
 * (TIncome)表实体类
 *
 * @author makejava
 * @since 2023-02-15 15:04:18
 */
@Data
@Accessors(chain = true)
@SuppressWarnings("serial")
public class TIncome extends Model<TIncome> {


    @TableId
    @JsonSerialize(using = LongToStringSerializer.class)
    private Long incId;
    /**
     * 养基id
     */
    @JsonSerialize(using = LongToStringSerializer.class)
    private Long supId;
    /**
     * 昨日收益
     */
    private Double incTom;
    /**
     * 先记录一遍，再更新收益时间
     */
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    private Date incDate;


    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.incId;
    }
}

